/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：ActionButton.java <br>
 * 创建时间：2014-3-23 上午10:22 <br>
 * 所属项目：GmudTest <br>
 * @author ubun <br>
 */
package lostland.gmud.exv2.ui;

import lostland.gmud.exv2.FontSize;
import lostland.gmud.exv2.Game;
import lostland.gmud.exv2.blgframework.impl.BLGGraphics;
import lostland.gmud.exv2.ui.core.ArrowButton;

/**
 * 类名：ActionButton <br>
 * 说明：功能菜单（按钮）
 *
 * @author ubun
 */

public class ActionButton extends ArrowButton {

	public static final int MARGIN_TOP = 1;
	public static final int MARGIN_LEFT = 1;
	static final int PADDING_LEFT = 11;
	static final int PADDING_TOP = 1;
	static final String S[] = {"内力", "练功", "轻功", "管理"};

	public static final int TOP = ActionBorder.TOP + MARGIN_TOP;
	public static final int LEFT = ActionBorder.LEFT + MARGIN_LEFT;
	public static final int WIDTH = 35;
	public static final int HEIGHT = 14;


	int index;

	public ActionButton(int index) {
		super(LEFT, TOP + index * (HEIGHT + MARGIN_TOP), WIDTH, HEIGHT);
		this.index = index;
		this.bordered = false;
		this.padding_top = PADDING_TOP;
	}

	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.GmudWindow#draw()
	 */
	@Override
	public void draw() {
		this.drawBackground();
		BLGGraphics g = (BLGGraphics) Game.getInstance().getGraphics();
		g.drawText(S[index], x + PADDING_LEFT, y + PADDING_TOP, FontSize.FT_12PX);
	}

}

